package com.example.cms.controller;

import com.example.cms.entity.Consultant;
import com.example.cms.pojo.Mesagge;
import com.example.cms.service.ConsultantService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @ClassName ConsultantController
 * @Descriptiom TODO
 * @Author Sunbird
 * @Date 2018/12/20 16:07
 * @Version 1.0
 **/
@RestController
public class ConsultantController {

    @Autowired
    private ConsultantService consultantService;

        @RequestMapping("findPageConsult")
        public Mesagge findPageConsult(Mesagge mesagge , Consultant consultant){
           List<Consultant> consultants= consultantService.getConAndCou();
            mesagge.setList(consultants);
            return  mesagge;
        }
}
